3.1.3 \(\int \frac {x^3}{a+b \sin ^2(x)} \, dx\) [3]

3.1.3.1 Optimal result
3.1.3.2 Mathematica [A] (verified)
3.1.3.3 Rubi [A] (verified)
3.1.3.4 Maple [B] (verified)
3.1.3.5 Fricas [B] (verification not implemented)
3.1.3.6 Sympy [F]
3.1.3.7 Maxima [F]
3.1.3.8 Giac [F]
3.1.3.9 Mupad [F(-1)]

3.1.3.1 Optimal result

Integrand size = 14, antiderivative size = 411 \[ \int \frac {x^3}{a+b \sin ^2(x)} \, dx=-\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{2 a+b-2 \sqrt {a} \sqrt {a+b}}\right )}{2 \sqrt {a} \sqrt {a+b}}+\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{2 a+b+2 \sqrt {a} \sqrt {a+b}}\right )}{2 \sqrt {a} \sqrt {a+b}}-\frac {3 x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a+b-2 \sqrt {a} \sqrt {a+b}}\right )}{4 \sqrt {a} \sqrt {a+b}}+\frac {3 x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a+b+2 \sqrt {a} \sqrt {a+b}}\right )}{4 \sqrt {a} \sqrt {a+b}}-\frac {3 i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a+b-2 \sqrt {a} \sqrt {a+b}}\right )}{4 \sqrt {a} \sqrt {a+b}}+\frac {3 i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a+b+2 \sqrt {a} \sqrt {a+b}}\right )}{4 \sqrt {a} \sqrt {a+b}}+\frac {3 \operatorname {PolyLog}\left (4,\frac {b e^{2 i x}}{2 a+b-2 \sqrt {a} \sqrt {a+b}}\right )}{8 \sqrt {a} \sqrt {a+b}}-\frac {3 \operatorname {PolyLog}\left (4,\frac {b e^{2 i x}}{2 a+b+2 \sqrt {a} \sqrt {a+b}}\right )}{8 \sqrt {a} \sqrt {a+b}} \]

output
-1/2*I*x^3*ln(1-b*exp(2*I*x)/(2*a+b-2*a^(1/2)*(a+b)^(1/2)))/a^(1/2)/(a+b)^ 
(1/2)+1/2*I*x^3*ln(1-b*exp(2*I*x)/(2*a+b+2*a^(1/2)*(a+b)^(1/2)))/a^(1/2)/( 
a+b)^(1/2)-3/4*x^2*polylog(2,b*exp(2*I*x)/(2*a+b-2*a^(1/2)*(a+b)^(1/2)))/a 
^(1/2)/(a+b)^(1/2)+3/4*x^2*polylog(2,b*exp(2*I*x)/(2*a+b+2*a^(1/2)*(a+b)^( 
1/2)))/a^(1/2)/(a+b)^(1/2)-3/4*I*x*polylog(3,b*exp(2*I*x)/(2*a+b-2*a^(1/2) 
*(a+b)^(1/2)))/a^(1/2)/(a+b)^(1/2)+3/4*I*x*polylog(3,b*exp(2*I*x)/(2*a+b+2 
*a^(1/2)*(a+b)^(1/2)))/a^(1/2)/(a+b)^(1/2)+3/8*polylog(4,b*exp(2*I*x)/(2*a 
+b-2*a^(1/2)*(a+b)^(1/2)))/a^(1/2)/(a+b)^(1/2)-3/8*polylog(4,b*exp(2*I*x)/ 
(2*a+b+2*a^(1/2)*(a+b)^(1/2)))/a^(1/2)/(a+b)^(1/2)
 
3.1.3.2 Mathematica [A] (verified)

Time = 3.77 (sec) , antiderivative size = 288, normalized size of antiderivative = 0.70 \[ \int \frac {x^3}{a+b \sin ^2(x)} \, dx=\frac {-4 i x^3 \log \left (1-\frac {b e^{2 i x}}{2 a+b-2 \sqrt {a (a+b)}}\right )+4 i x^3 \log \left (1-\frac {b e^{2 i x}}{2 a+b+2 \sqrt {a (a+b)}}\right )-6 x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a+b-2 \sqrt {a (a+b)}}\right )+6 x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a+b+2 \sqrt {a (a+b)}}\right )-6 i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a+b-2 \sqrt {a (a+b)}}\right )+6 i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a+b+2 \sqrt {a (a+b)}}\right )+3 \operatorname {PolyLog}\left (4,\frac {b e^{2 i x}}{2 a+b-2 \sqrt {a (a+b)}}\right )-3 \operatorname {PolyLog}\left (4,\frac {b e^{2 i x}}{2 a+b+2 \sqrt {a (a+b)}}\right )}{8 \sqrt {a (a+b)}} \]

input
Integrate[x^3/(a + b*Sin[x]^2),x]
 
output
((-4*I)*x^3*Log[1 - (b*E^((2*I)*x))/(2*a + b - 2*Sqrt[a*(a + b)])] + (4*I) 
*x^3*Log[1 - (b*E^((2*I)*x))/(2*a + b + 2*Sqrt[a*(a + b)])] - 6*x^2*PolyLo 
g[2, (b*E^((2*I)*x))/(2*a + b - 2*Sqrt[a*(a + b)])] + 6*x^2*PolyLog[2, (b* 
E^((2*I)*x))/(2*a + b + 2*Sqrt[a*(a + b)])] - (6*I)*x*PolyLog[3, (b*E^((2* 
I)*x))/(2*a + b - 2*Sqrt[a*(a + b)])] + (6*I)*x*PolyLog[3, (b*E^((2*I)*x)) 
/(2*a + b + 2*Sqrt[a*(a + b)])] + 3*PolyLog[4, (b*E^((2*I)*x))/(2*a + b - 
2*Sqrt[a*(a + b)])] - 3*PolyLog[4, (b*E^((2*I)*x))/(2*a + b + 2*Sqrt[a*(a 
+ b)])])/(8*Sqrt[a*(a + b)])
 
3.1.3.3 Rubi [A] (verified)

Time = 1.33 (sec) , antiderivative size = 393, normalized size of antiderivative = 0.96, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.786, Rules used = {5096, 3042, 3802, 25, 2694, 27, 2620, 3011, 7163, 2720, 7143}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^3}{a+b \sin ^2(x)} \, dx\)

\(\Big \downarrow \) 5096

\(\displaystyle 2 \int \frac {x^3}{2 a+b-b \cos (2 x)}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle 2 \int \frac {x^3}{2 a+b-b \sin \left (2 x+\frac {\pi }{2}\right )}dx\)

\(\Big \downarrow \) 3802

\(\displaystyle 4 \int -\frac {e^{2 i x} x^3}{e^{4 i x} b+b-2 (2 a+b) e^{2 i x}}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -4 \int \frac {e^{2 i x} x^3}{e^{4 i x} b+b-2 (2 a+b) e^{2 i x}}dx\)

\(\Big \downarrow \) 2694

\(\displaystyle -4 \left (\frac {b \int -\frac {e^{2 i x} x^3}{2 \left (2 a+2 \sqrt {a+b} \sqrt {a}-b e^{2 i x}+b\right )}dx}{2 \sqrt {a} \sqrt {a+b}}-\frac {b \int -\frac {e^{2 i x} x^3}{2 \left (2 a-2 \sqrt {a+b} \sqrt {a}-b e^{2 i x}+b\right )}dx}{2 \sqrt {a} \sqrt {a+b}}\right )\)

\(\Big \downarrow \) 27

\(\displaystyle -4 \left (\frac {b \int \frac {e^{2 i x} x^3}{2 a-2 \sqrt {a+b} \sqrt {a}-b e^{2 i x}+b}dx}{4 \sqrt {a} \sqrt {a+b}}-\frac {b \int \frac {e^{2 i x} x^3}{2 a+2 \sqrt {a+b} \sqrt {a}-b e^{2 i x}+b}dx}{4 \sqrt {a} \sqrt {a+b}}\right )\)

\(\Big \downarrow \) 2620

\(\displaystyle -4 \left (\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{-2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \int x^2 \log \left (1-\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )dx}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}-\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \int x^2 \log \left (1-\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )dx}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}\right )\)

\(\Big \downarrow \) 3011

\(\displaystyle -4 \left (\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{-2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \left (\frac {1}{2} i x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )-i \int x \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )dx\right )}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}-\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \left (\frac {1}{2} i x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )-i \int x \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )dx\right )}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}\right )\)

\(\Big \downarrow \) 7163

\(\displaystyle -4 \left (\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{-2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \left (\frac {1}{2} i x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )-i \left (\frac {1}{2} i \int \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )dx-\frac {1}{2} i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )\right )\right )}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}-\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \left (\frac {1}{2} i x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )-i \left (\frac {1}{2} i \int \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )dx-\frac {1}{2} i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )\right )\right )}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}\right )\)

\(\Big \downarrow \) 2720

\(\displaystyle -4 \left (\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{-2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \left (\frac {1}{2} i x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )-i \left (\frac {1}{4} \int e^{-2 i x} \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )de^{2 i x}-\frac {1}{2} i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )\right )\right )}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}-\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \left (\frac {1}{2} i x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )-i \left (\frac {1}{4} \int e^{-2 i x} \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )de^{2 i x}-\frac {1}{2} i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )\right )\right )}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}\right )\)

\(\Big \downarrow \) 7143

\(\displaystyle -4 \left (\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{-2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \left (\frac {1}{2} i x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )-i \left (\frac {1}{4} \operatorname {PolyLog}\left (4,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )-\frac {1}{2} i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a-2 \sqrt {a+b} \sqrt {a}+b}\right )\right )\right )}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}-\frac {b \left (\frac {i x^3 \log \left (1-\frac {b e^{2 i x}}{2 \sqrt {a} \sqrt {a+b}+2 a+b}\right )}{2 b}-\frac {3 i \left (\frac {1}{2} i x^2 \operatorname {PolyLog}\left (2,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )-i \left (\frac {1}{4} \operatorname {PolyLog}\left (4,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )-\frac {1}{2} i x \operatorname {PolyLog}\left (3,\frac {b e^{2 i x}}{2 a+2 \sqrt {a+b} \sqrt {a}+b}\right )\right )\right )}{2 b}\right )}{4 \sqrt {a} \sqrt {a+b}}\right )\)

input
Int[x^3/(a + b*Sin[x]^2),x]
 
output
-4*((b*(((I/2)*x^3*Log[1 - (b*E^((2*I)*x))/(2*a + b - 2*Sqrt[a]*Sqrt[a + b 
])])/b - (((3*I)/2)*((I/2)*x^2*PolyLog[2, (b*E^((2*I)*x))/(2*a + b - 2*Sqr 
t[a]*Sqrt[a + b])] - I*((-1/2*I)*x*PolyLog[3, (b*E^((2*I)*x))/(2*a + b - 2 
*Sqrt[a]*Sqrt[a + b])] + PolyLog[4, (b*E^((2*I)*x))/(2*a + b - 2*Sqrt[a]*S 
qrt[a + b])]/4)))/b))/(4*Sqrt[a]*Sqrt[a + b]) - (b*(((I/2)*x^3*Log[1 - (b* 
E^((2*I)*x))/(2*a + b + 2*Sqrt[a]*Sqrt[a + b])])/b - (((3*I)/2)*((I/2)*x^2 
*PolyLog[2, (b*E^((2*I)*x))/(2*a + b + 2*Sqrt[a]*Sqrt[a + b])] - I*((-1/2* 
I)*x*PolyLog[3, (b*E^((2*I)*x))/(2*a + b + 2*Sqrt[a]*Sqrt[a + b])] + PolyL 
og[4, (b*E^((2*I)*x))/(2*a + b + 2*Sqrt[a]*Sqrt[a + b])]/4)))/b))/(4*Sqrt[ 
a]*Sqrt[a + b]))
 

3.1.3.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2620
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ 
((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp 
[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si 
mp[d*(m/(b*f*g*n*Log[F]))   Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x 
)))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
 

rule 2694
Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.) 
*(F_)^(v_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[2*(c/q)   Int 
[(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Simp[2*(c/q)   Int[(f + g*x) 
^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[ 
v, 2*u] && LinearQ[u, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[m, 0]
 

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) 
*(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
 

rule 3011
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) 
*(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + 
b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F]))   Int[(f + g*x)^( 
m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e 
, f, g, n}, x] && GtQ[m, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3802
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + Pi*(k_.) + (f_.)*( 
x_)]), x_Symbol] :> Simp[2   Int[(c + d*x)^m*E^(I*Pi*(k - 1/2))*(E^(I*(e + 
f*x))/(b + 2*a*E^(I*Pi*(k - 1/2))*E^(I*(e + f*x)) - b*E^(2*I*k*Pi)*E^(2*I*( 
e + f*x)))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[2*k] && NeQ 
[a^2 - b^2, 0] && IGtQ[m, 0]
 

rule 5096
Int[(x_)^(m_.)*((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]^2)^(n_), x_Symbol] :> 
Simp[1/2^n   Int[x^m*(2*a + b - b*Cos[2*c + 2*d*x])^n, x], x] /; FreeQ[{a, 
b, c, d}, x] && NeQ[a + b, 0] && IGtQ[m, 0] && ILtQ[n, 0] && (EqQ[n, -1] || 
 (EqQ[m, 1] && EqQ[n, -2]))
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 

rule 7163
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_. 
)*(x_))))^(p_.)], x_Symbol] :> Simp[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a 
+ b*x)))^p]/(b*c*p*Log[F])), x] - Simp[f*(m/(b*c*p*Log[F]))   Int[(e + f*x) 
^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c 
, d, e, f, n, p}, x] && GtQ[m, 0]
 
3.1.3.4 Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 852 vs. \(2 (311 ) = 622\).

Time = 0.57 (sec) , antiderivative size = 853, normalized size of antiderivative = 2.08

method result size
risch \(\text {Expression too large to display}\) \(853\)

input
int(x^3/(a+sin(x)^2*b),x,method=_RETURNVERBOSE)
 
output
1/2*I/(a*(a+b))^(1/2)/(2*(a*(a+b))^(1/2)+2*a+b)*ln(1-b*exp(2*I*x)/(2*(a*(a 
+b))^(1/2)+2*a+b))*b*x^3-3/4*I/(a*(a+b))^(1/2)*x*polylog(3,b*exp(2*I*x)/(- 
2*(a*(a+b))^(1/2)+2*a+b))+I/(a*(a+b))^(1/2)/(2*(a*(a+b))^(1/2)+2*a+b)*ln(1 
-b*exp(2*I*x)/(2*(a*(a+b))^(1/2)+2*a+b))*a*x^3+1/2/(2*(a*(a+b))^(1/2)+2*a+ 
b)*x^4+1/2/(a*(a+b))^(1/2)/(2*(a*(a+b))^(1/2)+2*a+b)*a*x^4+1/4/(a*(a+b))^( 
1/2)/(2*(a*(a+b))^(1/2)+2*a+b)*b*x^4+3/2*I/(2*(a*(a+b))^(1/2)+2*a+b)*polyl 
og(3,b*exp(2*I*x)/(2*(a*(a+b))^(1/2)+2*a+b))*x+3/2/(2*(a*(a+b))^(1/2)+2*a+ 
b)*polylog(2,b*exp(2*I*x)/(2*(a*(a+b))^(1/2)+2*a+b))*x^2-1/2*I/(a*(a+b))^( 
1/2)*x^3*ln(1-b*exp(2*I*x)/(-2*(a*(a+b))^(1/2)+2*a+b))+I/(2*(a*(a+b))^(1/2 
)+2*a+b)*ln(1-b*exp(2*I*x)/(2*(a*(a+b))^(1/2)+2*a+b))*x^3+3/2/(a*(a+b))^(1 
/2)/(2*(a*(a+b))^(1/2)+2*a+b)*polylog(2,b*exp(2*I*x)/(2*(a*(a+b))^(1/2)+2* 
a+b))*a*x^2+3/4/(a*(a+b))^(1/2)/(2*(a*(a+b))^(1/2)+2*a+b)*polylog(2,b*exp( 
2*I*x)/(2*(a*(a+b))^(1/2)+2*a+b))*b*x^2-3/4/(2*(a*(a+b))^(1/2)+2*a+b)*poly 
log(4,b*exp(2*I*x)/(2*(a*(a+b))^(1/2)+2*a+b))-3/4/(a*(a+b))^(1/2)/(2*(a*(a 
+b))^(1/2)+2*a+b)*polylog(4,b*exp(2*I*x)/(2*(a*(a+b))^(1/2)+2*a+b))*a-3/8/ 
(a*(a+b))^(1/2)/(2*(a*(a+b))^(1/2)+2*a+b)*polylog(4,b*exp(2*I*x)/(2*(a*(a+ 
b))^(1/2)+2*a+b))*b+3/2*I/(a*(a+b))^(1/2)/(2*(a*(a+b))^(1/2)+2*a+b)*polylo 
g(3,b*exp(2*I*x)/(2*(a*(a+b))^(1/2)+2*a+b))*a*x-1/4/(a*(a+b))^(1/2)*x^4-3/ 
4/(a*(a+b))^(1/2)*x^2*polylog(2,b*exp(2*I*x)/(-2*(a*(a+b))^(1/2)+2*a+b))+3 
/4*I/(a*(a+b))^(1/2)/(2*(a*(a+b))^(1/2)+2*a+b)*polylog(3,b*exp(2*I*x)/(...
 
3.1.3.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 3188 vs. \(2 (307) = 614\).

Time = 1.22 (sec) , antiderivative size = 3188, normalized size of antiderivative = 7.76 \[ \int \frac {x^3}{a+b \sin ^2(x)} \, dx=\text {Too large to display} \]

input
integrate(x^3/(a+b*sin(x)^2),x, algorithm="fricas")
 
output
-1/4*(-I*b*x^3*sqrt((a^2 + a*b)/b^2)*log(-(((2*a + b)*cos(x) + (2*I*a + I* 
b)*sin(x) - 2*(b*cos(x) + I*b*sin(x))*sqrt((a^2 + a*b)/b^2))*sqrt((2*b*sqr 
t((a^2 + a*b)/b^2) + 2*a + b)/b) - b)/b) + I*b*x^3*sqrt((a^2 + a*b)/b^2)*l 
og((((2*a + b)*cos(x) - (2*I*a + I*b)*sin(x) - 2*(b*cos(x) - I*b*sin(x))*s 
qrt((a^2 + a*b)/b^2))*sqrt((2*b*sqrt((a^2 + a*b)/b^2) + 2*a + b)/b) + b)/b 
) + I*b*x^3*sqrt((a^2 + a*b)/b^2)*log(-(((2*a + b)*cos(x) + (-2*I*a - I*b) 
*sin(x) - 2*(b*cos(x) - I*b*sin(x))*sqrt((a^2 + a*b)/b^2))*sqrt((2*b*sqrt( 
(a^2 + a*b)/b^2) + 2*a + b)/b) - b)/b) - I*b*x^3*sqrt((a^2 + a*b)/b^2)*log 
((((2*a + b)*cos(x) - (-2*I*a - I*b)*sin(x) - 2*(b*cos(x) + I*b*sin(x))*sq 
rt((a^2 + a*b)/b^2))*sqrt((2*b*sqrt((a^2 + a*b)/b^2) + 2*a + b)/b) + b)/b) 
 + I*b*x^3*sqrt((a^2 + a*b)/b^2)*log(-(((2*a + b)*cos(x) + (2*I*a + I*b)*s 
in(x) + 2*(b*cos(x) + I*b*sin(x))*sqrt((a^2 + a*b)/b^2))*sqrt(-(2*b*sqrt(( 
a^2 + a*b)/b^2) - 2*a - b)/b) - b)/b) - I*b*x^3*sqrt((a^2 + a*b)/b^2)*log( 
(((2*a + b)*cos(x) - (2*I*a + I*b)*sin(x) + 2*(b*cos(x) - I*b*sin(x))*sqrt 
((a^2 + a*b)/b^2))*sqrt(-(2*b*sqrt((a^2 + a*b)/b^2) - 2*a - b)/b) + b)/b) 
- I*b*x^3*sqrt((a^2 + a*b)/b^2)*log(-(((2*a + b)*cos(x) + (-2*I*a - I*b)*s 
in(x) + 2*(b*cos(x) - I*b*sin(x))*sqrt((a^2 + a*b)/b^2))*sqrt(-(2*b*sqrt(( 
a^2 + a*b)/b^2) - 2*a - b)/b) - b)/b) + I*b*x^3*sqrt((a^2 + a*b)/b^2)*log( 
(((2*a + b)*cos(x) - (-2*I*a - I*b)*sin(x) + 2*(b*cos(x) + I*b*sin(x))*sqr 
t((a^2 + a*b)/b^2))*sqrt(-(2*b*sqrt((a^2 + a*b)/b^2) - 2*a - b)/b) + b)...
 
3.1.3.6 Sympy [F]

\[ \int \frac {x^3}{a+b \sin ^2(x)} \, dx=\int \frac {x^{3}}{a + b \sin ^{2}{\left (x \right )}}\, dx \]

input
integrate(x**3/(a+b*sin(x)**2),x)
 
output
Integral(x**3/(a + b*sin(x)**2), x)
 
3.1.3.7 Maxima [F]

\[ \int \frac {x^3}{a+b \sin ^2(x)} \, dx=\int { \frac {x^{3}}{b \sin \left (x\right )^{2} + a} \,d x } \]

input
integrate(x^3/(a+b*sin(x)^2),x, algorithm="maxima")
 
output
integrate(x^3/(b*sin(x)^2 + a), x)
 
3.1.3.8 Giac [F]

\[ \int \frac {x^3}{a+b \sin ^2(x)} \, dx=\int { \frac {x^{3}}{b \sin \left (x\right )^{2} + a} \,d x } \]

input
integrate(x^3/(a+b*sin(x)^2),x, algorithm="giac")
 
output
integrate(x^3/(b*sin(x)^2 + a), x)
 
3.1.3.9 Mupad [F(-1)]

Timed out. \[ \int \frac {x^3}{a+b \sin ^2(x)} \, dx=\int \frac {x^3}{b\,{\sin \left (x\right )}^2+a} \,d x \]

input
int(x^3/(a + b*sin(x)^2),x)
 
output
int(x^3/(a + b*sin(x)^2), x)